<template>
	<view class="layout">
		<view class="menu-list">
			<view class="menu-item" v-for="(item, index) in list" :key="index" @click="jumpGoodlist()">
				<view>
					<u-image width="88rpx" height="88rpx" class="menu-img" :src="item.image">
						<u-loading slot="loading"></u-loading>
					</u-image>
				</view>
				<view class="menu-title">{{item.title}}</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				list: [
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/0f423fb60f084b2caade164fae25a9a0.png',
						title: '轮胎'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/24b886dd9ea84559bdf173320b6c7366.png',
						title: '洗车'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/d1a0cea8d5554bafafef7734efc08820.png',
						title: '喷漆'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/9a107ef24c444b30bf3a577ed9630fe1.jpeg',
						title: '贴膜'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/ebc6c9e114d6416f9985a3ff7c8ea19f.png',
						title: '记录仪'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/ada7d39419554cb1ab52b3d5aae1563a.png',
						title: '维修'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/230f48f024a343c6be9be72597c2dcd0.png',
						title: '升级'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/0f423fb60f084b2caade164fae25a9a0.png',
						title: '机油'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/665dd952b54e4911b99b5e1eba4b164f.png',
						title: '方向盘'
					},
					{
						image: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/9bd0d0ed2ec546619d62889f2ae465c7.jpeg',
						title: '玻璃水'
					},
				]
			};
		},
		
		methods: {
			jumpGoodlist() {
				uni.navigateTo({
				    url:'/pages/navigation/search/searchPage?isShowSeachGoods=true',
				});
			}
		}
	};
</script>
<style lang="scss" scoped>
	@import "./tpl.scss";

	.menu-list {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;

		>.menu-item {
			text-align: center;
			width: 20%;
			// flex: 1;
			margin: 20rpx 0;
		}
	}

	.menu-img {
		display: flex;
		margin: 0 auto;
		width: 88rpx;
		height: 88rpx;
	}

	.menu-title {
		font-size: 24rpx;
	}
</style>
